from django.db import models

# Create your models here.

class SKU(models.Model):

    """
    商品SKU
    """
    IMAGE_DOWNLOAD_STATUS = (
        (1, "采集完成"),
        (2, "")
    )
    lang = models.CharField(max_length=50, default='', verbose_name='语言')
    Binding = models.CharField(max_length=50, default='', verbose_name='Binding')
    Brand = models.CharField(max_length=50, default='', verbose_name='标题')
    Color = models.CharField(max_length=50, default='', verbose_name='颜色')
    Department = models.CharField(max_length=50, default='', verbose_name='部门')
    Label = models.CharField(max_length=50, default='', verbose_name='标签')
    Manufacturer = models.CharField(max_length=50, default='', verbose_name="制造商")
    NumberOfItems = models.CharField(max_length=10, default='', verbose_name="订单详情数量")
    PackageQuantity = models.CharField(max_length=10, default='', verbose_name="包裹数量")
    PartNumber = models.CharField(max_length=50, default='', verbose_name="零件号")
    ProductGroup = models.CharField(max_length=50, default='', verbose_name="产品组")
    ProductTypeName = models.CharField(max_length=50, default='', verbose_name="产品类型名称")
    Publisher = models.CharField(max_length=50, default='', verbose_name="出版商")
    Size = models.CharField(max_length=50, default='', verbose_name='尺码大小')
    SmallImage = models.CharField(max_length=300, default='', verbose_name='尺码大小')
    Studio = models.CharField(max_length=50, default='', verbose_name='制造厂')
    Title = models.CharField(max_length=300, default='', verbose_name='制造厂')
    ASIN = models.CharField(max_length=15, default='', verbose_name='ASIN')
    SalesChannel = models.CharField(max_length=15, default='', verbose_name='ASIN')
    ProductCategoryId = models.CharField(max_length=50, default='', verbose_name='排名类型')
    Rank = models.CharField(max_length=50, default='', verbose_name='排名')



    # goods = models.ForeignKey(Goods, on_delete=models.CASCADE, verbose_name='商品')
    # category = models.ForeignKey(GoodsCategory, on_delete=models.PROTECT, verbose_name='从属类别')
    # buy_box_price = models.DecimalField(max_digits=10, default=0, decimal_places=2, verbose_name='BuyBox价格')
    # offer_min_price = models.DecimalField(max_digits=10, default=0, decimal_places=2, verbose_name='offer最低价')
    # offer = models.DecimalField(max_digits=10, default=0, decimal_places=2, verbose_name='offer')
    # comments = models.IntegerField(default=0, verbose_name='评价数')
    # good_version = models.CharField(max_length=50, verbose_name="型号")
    # status = models.SmallIntegerField(choices=IMAGE_DOWNLOAD_STATUS, default=2, verbose_name='图片是否下载')
    # color = models.CharField(max_length=50, verbose_name='颜色')
    # country = models.CharField(max_length=167, verbose_name='国家')
    # star = models.DecimalField(max_digits=2, decimal_places=1, verbose_name='评分')
    # seller_type = models.CharField(max_length=50, verbose_name='卖家类型')
    # haven_cart = models.BooleanField(default='False', verbose_name='有无购物车')
    # stock = models.IntegerField(default=0, verbose_name='库存')
    # sales = models.IntegerField(default=0, verbose_name='销量')
    # is_launched = models.BooleanField(default=True, verbose_name='是否上架销售')
    # product_url = models.CharField(max_length=200, default='', null=True, blank=True, verbose_name='产品地址')
    # small_image_url = models.CharField(max_length=500, default='', null=True, blank=True, verbose_name='缩略图地址')
    # heavy_image_url = models.CharField(max_length=700, default='', null=True, blank=True, verbose_name='高清图地址')
    # local_image_url = models.CharField(max_length=100, default='', null=True, blank=True, verbose_name='本地图地址')
    # remark = models.CharField(max_length=100, default='', verbose_name='备注')
    # goods_short_desc = models.CharField(max_length=400, verbose_name='产品短描述')
    # goods_long_desc = models.CharField(max_length=500, verbose_name='产品长描述')
    # task = models.CharField(max_length=50,verbose_name='任务')
    # get_time = models.CharField(max_length=20, default='', verbose_name='Date First Available3')
    # best_seller_rank = models.CharField(max_length=30, verbose_name="Best Sellers Rank")
    # can_sell_info = models.CharField(max_length=100, default='', verbose_name='可售信息')
    # general_info = models.CharField(max_length=100, default='', verbose_name='通用信息')


    class Meta:
        db_table = 'tb_sku'
        verbose_name = '商品SKU'
        verbose_name_plural = verbose_name

    def __str__(self):
        return '%s: %s' % (self.id, self.Brand)